package com.adp.interceptor;

import com.adf.config.component.application.report.ReportBean;
import com.adf.system.ReportRequest;
import com.adf.system.intercept.AbsInterceptorDefaultAdapter;

public class UserListCondition extends AbsInterceptorDefaultAdapter {
	@Override
	public Object beforeLoadData(ReportRequest rrequest, ReportBean rbean,
                                 Object typeObj, String sql) {
		String orgid = rrequest.getStringAttribute("pid","");
		if(orgid != null && !"".equals(orgid) && !"0".equals(orgid) && !"4028801547c4755d0147c49742780002".equals(orgid)){
			rrequest.getRequest().getSession().setAttribute("orgid",orgid);//在session中存入pid的值，以便后面的查询条件能从中取到数据。
		}else{
			rrequest.getRequest().getSession().setAttribute("orgid","");
		}
		
		return super.beforeLoadData(rrequest, rbean, typeObj, sql);
	}
}
